<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
		<title> TravelDream </title>
		<link href="../webApp/style.css" rel="stylesheet" type="text/css" > </link>
</h:head>
<h:body>
	<div>
		<ui:include src="./headerUtenteLoggato.xhtml" />
		<div id='bodyContainer'>
			
			<br />
			<div id='container'><span id='title'><center>STORICO ACQUISTI!</center></span><br/>
				<center>Lo Storico Acquisti contiene tutti i pacchetti che hai acquistato!</center>
			</div>
			<br />
			<div id='container'><span id='title'>Pacchetti Acquistati</span> <h:form style="display: inline"></h:form>
				<hr id="titlehr"/>
			<br />
			
						<h:dataTable value="#{purchaseBean.userPurchasedPackages}" var="a" class='userTable'>
				   <h:column>    				
				      <f:facet name="header"></f:facet>    				
				      <span id="field">ID Pacchetto: </span>#{a.idPackageTd}
				   </h:column>
				   <h:column>    				
				      <f:facet name="header"></f:facet>    				
				      <span id="field">Prezzo: </span>#{a.endPrice}
				   </h:column>
				   <h:column>    				
				      <f:facet name="header"></f:facet>    				
				      <span id="field">Numero di Persone: </span>#{a.people}
				   </h:column>
				   <h:column>    				
				   	<h:form>
				      <h:commandButton action="#{userPackageManager.viewStoricoPackage(a.idPackageTd)}" value="Visualizza"/>
				      </h:form>
				   </h:column>

				</h:dataTable>	




			<br />
			</div>
			<br />
			<ui:include src="./sharedUserBox.xhtml" />
			<br/>
		</div>		
		<ui:include src="../webApp/footer.xhtml" />
	</div>
</h:body>
</html>